-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK-2254-go-create-qr-code #288
SDK-2254-go-create-qr-code #288
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please review the commit message with something in line with the goal you want to achieve and split unrelated changes in other commits (example class)?
_examples/idv/handlers.session.go
Outdated
if err != nil { | ||
return fmt.Errorf("failed to initialise Share client :: %w", err) | ||
} | ||
//didClient.OverrideAPIURL("https://connect.public.stg1.dmz.yoti.com/share/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not expose internal resources in public repos
_examples/idv/handlers.session.go
Outdated
} | ||
fmt.Println(string(b)) | ||
|
||
shareSession, err := didClient.CreateShareSession(sessionReq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to split this in 2 commits
commit_a
: create example for session creation
commit_b
: add session QR creation to example (this commit should have the SDK-2254 in the name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That example is just testing purposes and now we are removing from idv.
_examples/idv/idv
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity, what's this binary file for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
executable in linux @irotech
@mehmet-yoti this and idv.exe
should just be added to the .gitignore
and delete-committed out of the repo?
@@ -80,3 +81,35 @@ func GetShareSession(httpClient requests.HttpClient, sessionID string, clientSdk | |||
err = json.Unmarshal(responseBytes, shareSession) | |||
return shareSession, err | |||
} | |||
|
|||
// CreateQrCode using the supplied sessionID parameter | |||
func CreateShareQrCode(httpClient requests.HttpClient, sessionID string, clientSdkId, apiUrl string, key *rsa.PrivateKey) (*QrCode, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it's missing a request body https://lampkicking.atlassian.net/wiki/spaces/CON/pages/3756458012/Share+v2+Flows#QR-Code-Creation it looks like it accepts some extra fields:
POST /v2/sessions/:sessionId/qr-codes
{
"transport": "", // optional - default is 'QR_CODE'
"displayMode": "" // optional - default is 'INLINE'
}
no idea what the accepted values are or if we should give clients a list of possible values, it's not documented there or in the ticket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java
and Node
SDK send empty JSON for this endpoint so the server-side defaults are used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm ok, happy to be consistent with other sdks, just curious why it's even an option if we won't expose these options to the RP
just gotta remove a couple things above and should be good |
I hope you're going to rebase and change these commit messages to follow the same format
|
…dling, simplified some functions
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
…nto base func. etc
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Co-authored-by: Klaidas Urbanavicius <[email protected]>
Sdk 2235 share v 2 retrieve receipt
SDK-2259:added retrieve qr code
bd35297
into
SDK-2230-Expose-share-v2-api
No description provided.